package com.zbkj.common.request.product;

import com.zbkj.common.request.PageParamRequest;
import com.zbkj.common.validation.CreateValidatorGroup;
import com.zbkj.common.validation.UpdateValidatorGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Auther:
 * @Date: 2024/9/12 13:48
 * @Description:
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "AdminProductSaveRequest对象", description = "服务端-商品保存请求对象")
public class AdminProductSaveRequest extends PageParamRequest {

    @ApiModelProperty("商品ID")
    @NotNull(groups = {UpdateValidatorGroup.class}, message = "商品ID参数不能为空")
    private Long id;

    @ApiModelProperty("商品名称")
    @NotBlank(groups = {CreateValidatorGroup.class,UpdateValidatorGroup.class}, message = "商品名称不能为空")
    private String productName;

    @ApiModelProperty("商品类型 1 订阅包 2 流量包 3 报告包")
    @NotNull(groups = {CreateValidatorGroup.class,UpdateValidatorGroup.class}, message = "商品类型不能为空")
    private Integer productType;

    @ApiModelProperty("商品单价")
    @NotNull(groups = {CreateValidatorGroup.class,UpdateValidatorGroup.class}, message = "商品单价不能为空")
    private BigDecimal productPrice;

    @ApiModelProperty("单价充值量")
    @NotNull(groups = {CreateValidatorGroup.class,UpdateValidatorGroup.class}, message = "充值量值不能为空")
    private Long productDataval;


    @ApiModelProperty("试用天数")
    @NotNull(groups = {CreateValidatorGroup.class,UpdateValidatorGroup.class}, message = "试用天数值不能为空")
    private Integer trialDays;

}
